
#ifndef _MEASUREMENT_H_
#define _MEASUREMENT_H_

#include <Unit.h>
#include <string>

using namespace std;

#define INVALID_OPERATION -1
#define STRING_STANDARD_PRINT_MODE 1
#define STRING_BASE_UNIT_PRINT_MODE 2

class Measurement
{
public:
    Measurement(const int amount, const Unit& unit); 
    bool operator == (const Measurement &measurement) const;
    bool operator != (const Measurement &measurement) const;
    Measurement operator + (const Measurement &measurement) const;
    string toString(const int printModel = STRING_STANDARD_PRINT_MODE) const;
    
private:
    int calcWithAmountAndUnit() const;
    bool isSameUnitType(const Measurement& other) const;
private:
    int amount;
    const Unit& unit;
};

#endif

